﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Runtime.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace WebApplication1.TagHelpers
{
    // You may need to install the Microsoft.AspNetCore.Razor.Runtime package into your project
    //[HtmlTargetElement("tag-name")]
    public class ContentTagHelper : TagHelper
    {
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            //output.PreElement.SetHtmlContent("<section>PreElement</section>");
            //output.PreContent.SetHtmlContent("<div>PreContent</div>");
            //output.Content.SetHtmlContent("<div>Content</div>");
            //output.PostContent.SetHtmlContent("<div>PostContent</div>");
            //output.PostElement.SetHtmlContent("<section>PostElement</section>");


            output.PreElement.SetHtmlContent("<section>PreElement</section>");
            output.PreContent.SetHtmlContent("<div>");
            output.Content.SetHtmlContent("<div>Content</div>");
            output.PostContent.SetHtmlContent("</div>");
            output.PostElement.SetHtmlContent("<section>PostElement</section>");
        }
    }
}
